package hospital.repository;

import hospital.model.hosp.Hospital;
import org.springframework.data.mongodb.repository.MongoRepository;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * @author
 * @description:
 */
@Repository
public interface HospitalRepository extends MongoRepository<Hospital,String> {

    //需要Spring Data的规范定义方法，可以不用写代码
    Hospital getHospitalByHoscode(String hoscode);

//    据医院的名称，进行模糊查询
    List<Hospital> findHospitalByHosnameLike(String hosname);
}
